//header的悬停事件

var dt_bav_btn12 = document.querySelector("#dt_nav_btn12");
var dt_bav_content12 = document.querySelector("#dt_nav_content12");


dt_bav_btn12.addEventListener("mouseover",function(){
    dt_bav_content12.style.display = "block";
});

dt_bav_btn12.addEventListener("mouseleave",function(){
    dt_bav_content12.style.display = "none";
});

dt_bav_content12.addEventListener("mouseover",function(){
    dt_bav_content12.style.display = "block";
});

dt_bav_content12.addEventListener("mouseleave",function(){
    dt_bav_content12.style.display = "none";
});




var dt_bav_btn13 = document.querySelector("#dt_nav_btn13");
var dt_bav_content13 = document.querySelector("#dt_nav_content13");


dt_bav_btn13.addEventListener("mouseover",function(){
    dt_bav_content13.style.display = "block";
});

dt_bav_btn13.addEventListener("mouseleave",function(){
    dt_bav_content13.style.display = "none";
});

dt_bav_content13.addEventListener("mouseover",function(){
    dt_bav_content13.style.display = "block";
});

dt_bav_content13.addEventListener("mouseleave",function() {
    dt_bav_content13.style.display = "none";

});



//nav的悬停事件
var dt_bav_btn = document.querySelector("#dt_nav_btn");
var dt_bav_content = document.querySelector("#dt_nav_content");


dt_bav_btn.addEventListener("mouseover",function(){
    dt_bav_content.style.display = "block";
});

dt_bav_btn.addEventListener("mouseleave",function(){
    dt_bav_content.style.display = "none";
});

dt_bav_content.addEventListener("mouseover",function(){
    dt_bav_content.style.display = "block";
});

dt_bav_content.addEventListener("mouseleave",function(){
    dt_bav_content.style.display = "none";
});



var dt_bav_btn1 = document.querySelector("#dt_nav_btn1");
var dt_bav_content1 = document.querySelector("#dt_nav_content1");


dt_bav_btn1.addEventListener("mouseover",function(){
    dt_bav_content1.style.display = "block";
});

dt_bav_btn1.addEventListener("mouseleave",function(){
    dt_bav_content1.style.display = "none";
});

dt_bav_content1.addEventListener("mouseover",function(){
    dt_bav_content1.style.display = "block";
});

dt_bav_content1.addEventListener("mouseleave",function(){
    dt_bav_content1.style.display = "none";
});



var dt_bav_btn2 = document.querySelector("#dt_nav_btn2");
var dt_bav_content2 = document.querySelector("#dt_nav_content2");


dt_bav_btn2.addEventListener("mouseover",function(){
    dt_bav_content2.style.display = "block";
});

dt_bav_btn2.addEventListener("mouseleave",function(){
    dt_bav_content2.style.display = "none";
});

dt_bav_content2.addEventListener("mouseover",function(){
    dt_bav_content2.style.display = "block";
});

dt_bav_content2.addEventListener("mouseleave",function(){
    dt_bav_content2.style.display = "none";
});


var dt_bav_btn3 = document.querySelector("#dt_nav_btn3");
var dt_bav_content3 = document.querySelector("#dt_nav_content3");


dt_bav_btn3.addEventListener("mouseover",function(){
    dt_bav_content3.style.display = "block";
});

dt_bav_btn3.addEventListener("mouseleave",function(){
    dt_bav_content3.style.display = "none";
});

dt_bav_content3.addEventListener("mouseover",function(){
    dt_bav_content3.style.display = "block";
});

dt_bav_content3.addEventListener("mouseleave",function(){
    dt_bav_content3.style.display = "none";
});



var dt_bav_btn4 = document.querySelector("#dt_nav_btn4");
var dt_bav_content4 = document.querySelector("#dt_nav_content4");


dt_bav_btn4.addEventListener("mouseover",function(){
    dt_bav_content4.style.display = "block";
});

dt_bav_btn4.addEventListener("mouseleave",function(){
    dt_bav_content4.style.display = "none";
});

dt_bav_content4.addEventListener("mouseover",function(){
    dt_bav_content4.style.display = "block";
});

dt_bav_content4.addEventListener("mouseleave",function(){
    dt_bav_content4.style.display = "none";
});



var dt_bav_btn5 = document.querySelector("#dt_nav_btn5");
var dt_bav_content5 = document.querySelector("#dt_nav_content5");


dt_bav_btn5.addEventListener("mouseover",function(){
    dt_bav_content5.style.display = "block";
});

dt_bav_btn5.addEventListener("mouseleave",function(){
    dt_bav_content5.style.display = "none";
});

dt_bav_content5.addEventListener("mouseover",function(){
    dt_bav_content5.style.display = "block";
});

dt_bav_content5.addEventListener("mouseleave",function(){
    dt_bav_content5.style.display = "none";
});






//footer的悬停事件
var dt_bav_btn11 = document.querySelector("#dt_nav_btn11");
var dt_bav_content11 = document.querySelector("#dt_nav_content11");


dt_bav_btn11.addEventListener("mouseover",function(){
    dt_bav_content11.style.display = "block";
});

dt_bav_btn11.addEventListener("mouseleave",function(){
    dt_bav_content11.style.display = "none";
});

dt_bav_content11.addEventListener("mouseover",function(){
    dt_bav_content11.style.display = "block";
});

dt_bav_content11.addEventListener("mouseleave",function(){
    dt_bav_content11.style.display = "none";
});




//导航按钮
var b = document.querySelector(".t");
var b1 = document.querySelector(".t1");
var d = document.querySelector(".nav-1");
var d1 = document.querySelector(".nav-1");

b.addEventListener("click",function(){
    b.style.display="block";
    d.style.display = "block";
    b1.style.display="block";
    b.style.display="none";

});
b1.addEventListener("click",function(){
    d1.style.display = "none";
    b.style.display = "block";
    b1.style.display="none";

});





//返回顶部
var toTop = document.querySelector("#toTop");

window.onscroll = function(){
    console.log(document.documentElement.scrollTop || document.body.scrollTop);
    if(document.documentElement.scrollTop > 100 || document.body.scrollTop){
        toTop.style.display = 'block';
    }else{
        toTop.style.display = 'none';
    }
    toTop.addEventListener('click',function(){
        //window.scrollTo(0,0);

        window.scrollTo({
            top:0,
            behavior:'smooth'

        })
    })

};

